# Version checking for RandomLib

set(PACKAGE_VERSION "@RandomLib_VERSION@")
set(PACKAGE_VERSION_MAJOR "@RandomLib_VERSION_MAJOR@")
set(PACKAGE_VERSION_MINOR "@RandomLib_VERSION_MINOR@")

if (WIN32 AND NOT "${CMAKE_GENERATOR}" STREQUAL "@CMAKE_GENERATOR@")
  # Reject if there's a mismatch on compiler versions (Windows only)
  set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (PACKAGE_FIND_VERSION)
  if (${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
    set (PACKAGE_VERSION_EXACT TRUE)
  elseif (${PACKAGE_FIND_VERSION} VERSION_LESS ${PACKAGE_VERSION}
    AND ${PACKAGE_FIND_VERSION_MAJOR} EQUAL ${PACKAGE_VERSION_MAJOR})
    set (PACKAGE_VERSION_COMPATIBLE TRUE)
  endif ()
endif ()
